package com.lingchen.entity;

import java.io.Serializable;

/**
 * Author    lingchen
 * Email     838878458@qq.com
 * Time      2018/2/26
 * Function  科目信息表
 */
public class Course implements Serializable {

    /**
     * 科目id
     */
    private String id;
    /**
     * 科目名字
     */
    private String name;

    /**
     * 题目个数
     */
    private int count;
    /**
     * 分数
     */
    private int score;

    /**
     * 总分
     */
    private int totalScore;


    private int showTop;
    public Course() {
    }

    public Course(String name) {
        this.name = name;
    }

    public Course(String name, int count, int score) {
        this.name = name;
        this.count = count;
        this.score = score;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
        setShowTop(name.equals("科目一")||name.equals("科目四")?1:0);
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public int getTotalScore() {
        return totalScore;
    }

    public void setTotalScore(int totalScore) {
        this.totalScore = totalScore;
    }

    public int getShowTop() {
        return showTop;
    }

    public void setShowTop(int showTop) {
        this.showTop = showTop;
    }

    @Override
    public String toString() {
        return "Course{" +
                "id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", count=" + count +
                ", score=" + score +
                ", totalScore=" + totalScore +
                '}';
    }
}
